package ods_field

import (
	"server/middleware"

	"github.com/gin-gonic/gin"
)

type OdsDbFieldRouter struct {
}

func (s *OdsDbFieldRouter) InitOdsDbFieldRouter(Router *gin.RouterGroup) {
	odsDbFieldRouter := Router.Group("odsDbField").Use(middleware.OperationRecord())
	odsDbFieldRouterWithoutRecord := Router.Group("odsDbField")
	var odsDbFieldApi = OdsDbFieldApi{}
	{
		odsDbFieldRouter.POST("createOdsDbField", odsDbFieldApi.CreateOdsDbField)
		odsDbFieldRouter.DELETE("deleteOdsDbField", odsDbFieldApi.DeleteOdsDbField)
		odsDbFieldRouter.DELETE("deleteOdsDbFieldByIds", odsDbFieldApi.DeleteOdsDbFieldByIds)
		odsDbFieldRouter.PUT("updateOdsDbField", odsDbFieldApi.UpdateOdsDbField)
	}
	{
		odsDbFieldRouterWithoutRecord.GET("findOdsDbField", odsDbFieldApi.FindOdsDbField)
		odsDbFieldRouterWithoutRecord.GET("getAllOdsDbFields", odsDbFieldApi.GetAllOdsDbFields)
		odsDbFieldRouterWithoutRecord.GET("getOdsDbFieldList", odsDbFieldApi.GetOdsDbFieldList)
	}
	{
		odsDbFieldRouterWithoutRecord.POST("getOdsTbFld", odsDbFieldApi.GetOdsTbFld)
		odsDbFieldRouter.POST("saveOdsTbFld", odsDbFieldApi.SaveOdsTbFld)

	}
	{
		odsDbFieldRouterWithoutRecord.POST("getOdsFldsByTbId", odsDbFieldApi.GetOdsFldsByTbId)
	}
}
